from selenium import webdriver
import time

options = webdriver.ChromeOptions()   # 创建对象

options.add_experimental_option('mobileEmulation', {'deviceName': 'iPhone SE'})  # 添加配置

driver = webdriver.Chrome(options=options)  # 打开浏览器
time.sleep(1)

driver.get('https://www.baidu.com')
time.sleep(2)

driver.find_element_by_id('index-kw').send_keys('四川地图')
driver.find_element_by_id('index-bn').click()
driver.find_element_by_link_text('地图').click()
time.sleep(5)

driver.quit()


